package com.itheima.sh.dao;

import com.itheima.sh.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface Usermapper {
    @Select("select username,password from user where username=#{username} and password=#{password}")
    User login(User user);

    @Insert("insert  into user value (null,#{username},#{password} )")
    void register(User user);

    @Select("select * from user where username=#{username}")
    User qusery(@Param("username")String username);
}
